/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Views;

import java.awt.Color;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JMenuItem;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author BENSON
 */
public class AdminHomePage extends javax.swing.JFrame {
DefaultTableModel displayTable= new DefaultTableModel(0,0);
    
    /**
     * Creates new form AdminHomePage
     */
    public AdminHomePage() {
        Color lightBlue = new Color(100, 125, 250);
        getContentPane().setBackground(lightBlue);
        initComponents();
    }
    /**
     * gets the defaultTableModel
     * @return 
     */
       public DefaultTableModel getTable (){
         return displayTable;
    }
       /**
        * gets the JTable
        * @return 
        */
    public JTable getJTable (){
         return myTable;
    }
    /**
     * gets search text field
     * @return 
     */
    public JTextField getSearchField(){
    return search;
    }
    /**
     * gets add reception button
     * @return 
     */
    public JButton getAddReceptionBtn(){
        return addR;
    }
    /**
     * gets modify reception button
     * @return 
     */
    public JButton getModifyReceptionBtn(){
        return modifyR;
    }
    /**
     * gets delete reception button
     * @return 
     */
    public JButton getDeleteReceptionBtn(){
        return deleteR;
    }
    /**
     * gets add doctor button
     * @return 
     */
      public JButton getAddDoctorBtn(){
        return addD;
    }
      /**
       * gets modify doctor button
       * @return 
       */
    public JButton getModifyDoctorBtn(){
        return modifyD;
    }
    /**
     * gets delete doctor button
     * @return 
     */
    public JButton getDeleteDoctorBtn(){
        return deleteR;
    }
    /**
     * gets log out button
     * @return 
     */
     public JButton getLogoutBtn(){
        return logout;
    }
     /**
      * gets import button
      * @return 
      */
      public JButton getImportReportBtn(){
        return importReport;
    }
      /**
       * gets the combo box
       * @return 
       */
     public JComboBox getSelectedOption(){
     return options;
     }
     /**
      * get list admin menu option
      * @return 
      */
     public JMenuItem getListAdminMenu(){
     return listAdminMenu;
     }
     /**
      * get add admin menu option
      * @return 
      */
     public JMenuItem getAddAdminMenu(){
     return addAdminMenu;
     }
     /**
      * get add Receptionist menu option
      * @return 
      */
     public JMenuItem getAddReceptionMenu(){
     return addRmenu;
     }
     /**
      * get modify Receptionist menu option
      * @return 
      */
     public JMenuItem getModifyReceptionMenu(){
     return modifyRMenu;
     }
     /**
      * get delete Receptionist menu option
      * @return 
      */
     public JMenuItem getDeleteReceptionMenu(){
     return deleteRMenu;
     }
     /**
      * get add doctor menu option
      * @return 
      */
     public JMenuItem getAddDoctorMenu(){
     return addDMenu;
     }
     /**
      * get modify doctor menu option
      * @return 
      */
     public JMenuItem getModifyDoctorMenu(){
     return modifyDMenu;
     }
     /**
      * get delete doctor menu option
      * @return 
      */
     public JMenuItem getDeleteDoctorMenu(){
     return deleteDMenu;
     }
    

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        addR = new javax.swing.JButton();
        addD = new javax.swing.JButton();
        modifyD = new javax.swing.JButton();
        logout = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        myTable = new javax.swing.JTable();
        search = new javax.swing.JTextField();
        options = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        modifyR = new javax.swing.JButton();
        deleteR = new javax.swing.JButton();
        deleteD = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        importReport = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        addRmenu = new javax.swing.JMenuItem();
        modifyRMenu = new javax.swing.JMenuItem();
        deleteRMenu = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        addDMenu = new javax.swing.JMenuItem();
        modifyDMenu = new javax.swing.JMenuItem();
        deleteDMenu = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        addAdminMenu = new javax.swing.JMenuItem();
        listAdminMenu = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        addR.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N
        addR.setText("Add");

        addD.setText("Add");

        modifyD.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N
        modifyD.setText("Modify");

        logout.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N
        logout.setText("Logout");

        myTable.setModel(displayTable);
        jScrollPane1.setViewportView(myTable);

        options.setBackground(new java.awt.Color(255, 153, 255));
        options.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "RECEPTIONIST", "PATIENTS", "DOCTORS", " " }));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search_icon.jpg"))); // NOI18N

        modifyR.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N
        modifyR.setText("Modify");

        deleteR.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N
        deleteR.setText("Delete");

        deleteD.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N
        deleteD.setText("Delete");

        jLabel2.setFont(new java.awt.Font("SansSerif", 1, 18)); // NOI18N
        jLabel2.setText("RECEPTIONIST");

        jLabel9.setFont(new java.awt.Font("SansSerif", 1, 18)); // NOI18N
        jLabel9.setText("DOCTORS");

        importReport.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N
        importReport.setText("Import Report");

        jMenu1.setText("Reception Control");

        addRmenu.setText("Add Receptionist");
        addRmenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addRmenuActionPerformed(evt);
            }
        });
        jMenu1.add(addRmenu);

        modifyRMenu.setText("Modify Receptionist");
        jMenu1.add(modifyRMenu);

        deleteRMenu.setText("Delete Receptionist");
        jMenu1.add(deleteRMenu);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Doctors Control");

        addDMenu.setText("Add Doctor");
        jMenu2.add(addDMenu);

        modifyDMenu.setText("Modify Doctor");
        jMenu2.add(modifyDMenu);

        deleteDMenu.setText("Delete Doctor");
        jMenu2.add(deleteDMenu);

        jMenuBar1.add(jMenu2);

        jMenu3.setText("AdminControl");

        addAdminMenu.setText("Add Admin");
        jMenu3.add(addAdminMenu);

        listAdminMenu.setText("List Admin");
        jMenu3.add(listAdminMenu);

        jMenuBar1.add(jMenu3);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addGap(127, 127, 127)
                        .addComponent(options, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(108, 108, 108)
                        .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(addR, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(modifyR, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)
                            .addComponent(deleteR, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(13, 13, 13)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(importReport)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(logout, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 725, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel9)
                    .addComponent(addD, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(modifyD, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(deleteD, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(20, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel2)
                        .addComponent(jLabel9))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(options, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(10, 10, 10)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(addR, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(38, 38, 38)
                        .addComponent(modifyR, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(41, 41, 41)
                        .addComponent(deleteR, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(addD, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(43, 43, 43)
                        .addComponent(modifyD, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(33, 33, 33)
                        .addComponent(deleteD, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(logout, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(importReport, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void addRmenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addRmenuActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_addRmenuActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(AdminHomePage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new AdminHomePage().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem addAdminMenu;
    private javax.swing.JButton addD;
    private javax.swing.JMenuItem addDMenu;
    private javax.swing.JButton addR;
    private javax.swing.JMenuItem addRmenu;
    private javax.swing.JButton deleteD;
    private javax.swing.JMenuItem deleteDMenu;
    private javax.swing.JButton deleteR;
    private javax.swing.JMenuItem deleteRMenu;
    private javax.swing.JButton importReport;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JMenuItem listAdminMenu;
    private javax.swing.JButton logout;
    private javax.swing.JButton modifyD;
    private javax.swing.JMenuItem modifyDMenu;
    private javax.swing.JButton modifyR;
    private javax.swing.JMenuItem modifyRMenu;
    private javax.swing.JTable myTable;
    private javax.swing.JComboBox options;
    private javax.swing.JTextField search;
    // End of variables declaration//GEN-END:variables
}
